<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <title>Title</title>
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/baiduTemplate.js"></script>
</head>
<body>
    <h1>购物车</h1>
    <ul id="list">
        <!--<li>
            <h3>商品名称</h3>
            <p>
                <span>单价：</span>
                <button>-</button>
                <input type="text" value="">
                <button>+</button>
                <span>合计：</span>
            </p>
        </li>-->
    </ul>
    <input type="checkbox" id="checkAll">全选&nbsp;&nbsp;&nbsp;&nbsp;需支付：￥<span>0</span>
    <script type="text/html" id="tmp">
        <%for(var i=0;i< arr.length;i++){%>
        <li>
            <input type="checkbox" class="check" onclick="oneChoose('<%=arr[i].isChoose%>','<%=arr[i].product_id%>')">
            <h3><%=arr[i].product_name%></h3>
            <p>
                <span>单价：<%=arr[i].product_price%></span>
                <button onclick="changeCount('<%=arr[i].product_id%>','-')">-</button>
                <input type="text" value="<%=arr[i].buyCount%>">
                <button onclick="changeCount('<%=arr[i].product_id%>','+')">+</button>
                <span>合计：<%=arr[i].product_price*arr[i].buyCount%></span>
                <button onclick="delOneGoods('<%=arr[i].product_id%>')">删除</button>
            </p>
        </li>
        <%}%>
    </script>
    <script src="../js/car.js"></script>
</body>
</html>